package com.zhao.dota.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhao.dota.model.Round;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface RoundMapper extends BaseMapper<Round> {

    @Select("select max(num) from round where league_id = #{leagueId}")
    Integer getNum(Integer leagueId);

    @Select("select * from round where league_id = #{leagueId} and finished = 0")
    Round getNotFinished(Integer leagueId);

}
